

Welcome to my Mission Builder v0.3 for the PS2 version of GTA SA.


The 'default.ide', 'peds.ide' and 'VEHICLES.IDE' will be read
if they are placed in the same directory as the mission builder.




New format:

To keep the amount of data types to a minimum, the system is different
from previous versions of the MB. Any global variables that start with
a number will be allocated at the address specified by that number and
multiplied by 4. A global variable named $100Test will be allocated at
address 400. Please note that the decompiler no longer uses hexadecimal
numbers when outputting global variable names. Any global variable that
doesn't start with a number will be allocated at an available address at
the end of the memory (specified by the DEFINE MEMORY command at the
start of the script). This allocation method will require more memory
than any mission editor that doesn't. The reason I chose to code the
mission builder like this was to keep the original script in its original
state or as close to it as possible when recompiling, preserving memory
addresses that was unused originally and perhaps avoiding problems related
to unknown memory issues. Future mission builders may use unused memory
addresses like previous version of the mission builder with DMA support did.




Data types:

Local variables used with integer and floating point numbers have been
changed from  1@  to  @1

Fixed-length strings (8 bytes) have been changed from "text" to 'text'

Global 8 byte string variables look like this: s$VariableName

Local 8 byte string variables look like this: s@123

Variable length strings look like this: "text"

Global variable length string variables look like this: v$VariableName

Local variable length string variables look like this: v@123




Arrays:

There are now 2 types of arrays. If a number is used as index, the
format goes like this:

  <variable>(<index>)

If a variable is used as index, the format goes like this:

  <variable>(<index>,<number of elements in the array><array type>)

Future versions of the builder will only have one type of array.

<number of elements in the array> is the size of the array. If the size
is set to 1, then the array isn't really an array. 0 would be invalid.
Variables can't be used to set the size of an array. If the size is 4
then the highest index is 3. An index of zero isn't used.

<array type> is one of the following:
i: integer
f: float
s: fixed length strings (8 bytes long)
v: variable length strings


A global integer variable array using a global variable as index with 4
elements looks like this:

  $VariableName($VariableName,4i)


A global floating-point variable array using a global variable as index with 4
elements looks like this:

  $VariableName($VariableName,4f)


A local fixed-length string variable array using a local variable as index with 4
elements looks like this:

  @123(@234,4s)




Does it work ? I worked against making the compiler reproduce the script
100%. I used a file comparing tool to compare the reproduced .scm against
the original. The only differences I've seen are the same as the differences
in earlier mission builders. The floating-point numbers are slightly different
but the differences are so small it doesn't show ingame. Unused junk at the
end of the original fixed-length strings are removed (like before). One unknown
byte in the beginning of the first segment is the only real difference from the
original script. With an automated file comparing tool, this one byte was the only
difference reported.


This readme is not very great at this time. If you need more readmeness,
read the readme released with the vice builders.


New stuff: GXT reader, automatic IMG tool to extract the scripts in the "script.img"
file and general support for external scripts. "Credit" files from GTA VC added.
Opcodes searching features brought back.

Known issues: Use a desktop resolution of 800x600 or higher. If lower, the
"open file" and "select destination path" dialog box will be too big.

Bugs fixed: Most of the 2nd segment object names didn't show up in the decompiled code
in versions 0.1 and 0.2.

The math system used to code math related stuff without specifying the opcodes does
not support arrays in this version.


Information about who did what can be found in the "stuff" folder. I used a code dans
made in the GXT reader to "decode" the "coded" GXT keys. Opcode definitions for SA
are being worked on by lots of people like Opius, steve-m, CyQ, Delfi, Craig Kostelecky,
CtlAltDel and PatrickW. If credits are missing, tell me about it, names and for what.

